class Chess {
	board = new Board();
	view = "red";
	pieces = [];
	selects = [];
	mays = [];

	show = function() {
		chess.board.init(chess.view);
		chess.board.pieces(chess.pieces, chess.view);
		chess.board.selects(chess.selects, chess.view);
		chess.board.mays(chess.mays, chess.view);
	};

	flip = function() {
		if (this.view == "black") {
			this.view = "red";
		} else {
			this.view = "black";
		}
		this.show();
	};
}
